﻿using System.Windows.Controls;

namespace YanZhiwei.DotNet3._5.Utilities.WPF
{
    /// <summary>
    /// WPF-Slider帮助类
    /// </summary>
    public static class SliderHelper
    {
        #region 设置Value【线程安全】
        /// <summary>
        /// 设置Value【线程安全】
        /// </summary>
        /// <param name="slider">Slider</param>
        /// <param name="value">数值</param>
        /// <returns>Slider</returns>
        public static Slider SetValueTF(this Slider slider, double value)
        {
            slider.Dispatch(sd => sd.Value = value);
            return slider;
        }
        #endregion 
    }
}
